#######################################################################################
#
# Files
#
#######################################################################################

* southeast_covid_data.RData - This is the main data used in the paper.  It contains 
  county-level data on the numuber of covid cases, deaths, tests, among others.  
  Data includes 37,422 rows.
  
  - fips - county fips
  - state - state name
  - county - county name
  - state_abbrev - state abbreviated name
  - cases - the 7 day moving average of confirmed cases in a county
  - deaths - the 7 day moving average of Covid-19 deaths in a county
  - tests - the 7 day moving average of Covid-19 tests in a county
  - date - the day for which data is recorded
  - date_window_start - the day in which the 7 day moving average window 
     starts
  - date_window_end - the day in which the 7 day moving average window
     ends, it is identical to the `date`
  - medinc - county median income
  - perWhite - fraction of county that is white
  - perRural - fraction of county that is rural
  - pop - county population
  - land_area - land area (size) of county, in square miles
  - pop_dens - population density of county, = `pop`/`land_area`
  - cases_flag - whether or not the county's confirmed cases are 
     imputed; see main text for discussion of imputation procedure
  - deaths_flag - whether or not the county's deaths are imputed; 
      see main text for dicussion of imputation procedure
  - tests_flag - whether or not the county's tests are imputed; 
      see main text for discussion of imputation procedure
  - tests.pc.ma - 7 day moving average of tests per 1000 people
  - cases.pc.ma - 7 day moving average of confirmed cases per 1000 
      people
  - deaths.pc.ma - 7 day moving average of deaths per 1000 people
  - dcases.pc - the change in confirmed cases per 1000 for the current day 
      relative to 7 days ago
  - dtests.pc - the change in tests per 1000 for the current day 
      relative to 7 days ago
  - cum_cases.pc - the cumulative number of confirmed cases per 1000 
      people
  - cum_tests.pc - the cumulative number of Covid-19 tests per 1000 
      people
  - cum_deaths.pc - the cumulative number of Covid-19 deaths per 1000 
      people
  - lag_cases.pc - the 7 day moving average of confirmed cases per 1000 people 6 
      days earlier
  - lag_tests.pc - the 7 day moving average of Covid-19 tests per 1000 people 6 
      days earlier
  - lag_deaths.pc - the 7 day moving average of Covid-19 deaths per 1000 people 6 
      days earlier
  - lag_cum_cases.pc - the cumulative number of confirmed cases per 1000 
      people from 6 days earlier
  - lag_cum_tests.pc - the cumulative number of Covid-19 tests per 1000 
      people from 6 days earlier
  - lag_cum_deaths.pc - the cumulative number of Covid-19 deaths per 1000 
      people from 6 days earlier
  - time.period - the number of days since March 16, 2020
  - lpop - log of county population
  - lmedinc - log of county median income
  - D - treatment indicator, =1 for counties in Tennessee and 0 otherwise


* travel_subset.RData - This is a subset of `southeast_covid_data` for which travel data 
  is available.  This data is only used in the Supplementary Appendix.  
  It contains 25,056 rows.  It includes all of the same variables as 
  `southeast_covid_data` and additionally includes:
  
  - workplaces_percent_change_from_baseline - the percentage change in trips to work 
    relative to a pre-Covid baseline; this comes from the Google Covid-19 Community 
    Mobility Reports.  
    

* state_covid_data.RData - state level data for the 7 states used in the paper. 
  Data includes 378 rows and 10 columns.  Many of the column names mirror those 
  in `southeast_covid_data.RData` but are provided here for completeness 

  - state - the name of the state
  - date - date for which data is provided
  - state.label - column is only used for plotting and should otherwise be ignored
  - cum_tests.pc - cumulative Covid-19 tests per 1000 people in the state
  - tests.pc.ma - 7 day moving average of Covid-19 tests per 1000 people in the state
  - cum_cases.pc - cumulative confirmed cases per 1000 people in the state
  - cases.pc.ma - 7 day moving average of confirmed cases per 1000 people in the state
  - cum_deaths.pc - cumulative deaths per 1000 people in the state
  - deaths.pc.ma - 7 day moving average of deaths per 1000 people in the state
  - cum_hosp.pc - cumulative Covid-19 hospitalizations per 1000 people in the state


* ihme_cases_data.RData - data from the IHME on estimated and confirmed cases for the 
  entire United States.
  
  - date - the date for which data is provided
  - est_cases - IHME's estimated number of Covid-19 cases
  - cases_ma - moving average of confirmed cases from IHME
  - location_name - the location for which the data is provided, it is "USA" for all rows
    

* policy_effects.R - This file contains all the main empirical results in the paper.  
  It is described in detail below.
  

* state_level_results.R - This file contains the descriptive results using state-level
  data: Figure 1 in the main text, and Figures S-3 and S-6 in the Supplementary Appendix.
  

* county_level_results.R - This file contains descriptive results using county-level 
  data: Figures S-2, S-4, and S-5 in the Supplementary Appendix.
  

* ihme_plot.R - Produces Figure S-1 in the Supplementary Appendix


#######################################################################################
#
# Software versions to produce results
#
#######################################################################################


R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] DRDID_1.0.4     pte_0.0.0.9000  ppe_0.0.0.9000  WeightIt_0.13.1
[5] cobalt_4.3.2    MatchIt_4.4.0   tidyr_1.3.0     ggplot2_3.4.0  

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.10       magrittr_2.0.3    tidyselect_1.2.0  munsell_0.5.0    
 [5] colorspace_2.1-0  R6_2.5.1          rlang_1.0.6       fansi_1.0.4      
 [9] dplyr_1.1.0       tools_4.2.1       grid_4.2.1        data.table_1.14.6
[13] gtable_0.3.1      utf8_1.2.3        cli_3.6.0         withr_2.5.0      
[17] tibble_3.1.8      lifecycle_1.0.3   crayon_1.5.2      purrr_1.0.1      
[21] BMisc_1.4.5       vctrs_0.5.2       trust_0.1-8       glue_1.6.2       
[25] compiler_4.2.1    pillar_1.8.1      generics_0.1.3    scales_1.2.1     
[29] backports_1.4.1   pkgconfig_2.0.3  


#######################################################################################
#
# How to reproduce main results (`policy_effects.R`)
#
#######################################################################################


The default choices in `policy_effects.R` code are to reproduce panel (a) and panel (c) of Figure 2.

To produce panel (b) and panel (d) of Figure 2:
  - set `tests_name <- "tests.pc.ma"`
  - set `cases_name <- "cases.pc.ma"`
  
The default choices in the code reproduce Figure 3.

To produce Figure S-7, use the default choices and uncomment and then additionally run the code block "additional code for matching"

To produce Figure S-8, use default choices except:
  - set `policy_date <- as.Date("2020-03-25")`

To produce Figure S-9, use default choices except:
  - set `policy_date <- as.Date("2020-04-18")
  
To produce Figure S-10, use default choices except:
  - set `xformla <- ~ lag_cum_tests.pc + lag_cum_cases.pc + lpop + lag_cum_deaths.pc + dcases.pc`
  
To produce Figure S-11, use default choices except:
  - set `xformla <- ~ lag_cum_tests.pc + lag_cum_cases.pc + pop_dens + lag_cum_deaths.pc`
  
To produce Figure S-12, use default choices except:
  - set `dta <- subset(dta, state != "Arkansas")`
  - set `dta2 <- subset(dta2, state != "Arkansas")`
  
To produce panel (a) of Figure S-13, use the default choices and run the code block "additional code for producing policy effects on deaths".  For panel (b), set `deaths_name <- "deaths.pc.ma"`

To produce Figure S-14, use the default choices and run the code block "additional code for producing policy effects on travel"


#######################################################################################
#
# How to reproduce state level descriptive results (`state_level_results.R`)
#
#######################################################################################

Default options in code produce all of Figure 1 and Figure S-3.

The default options produce panel (a) of Figure S-6.  To produce panel (b) of Figure 
S-6, set `this_date <- as.Date("2020-04-25")`


#######################################################################################
#
# How to reproduce county level descriptive results (`county_level_results.R`)
#
#######################################################################################

Default options in code produce all of Figures S-2 and S-4 in the Supplementary 
Appendix.

The default options produce panel (a) of Figure S-5.  

To produce panel (b) of Figure S-5, use default options except 
set `this_date <- as.Date("2020-04-25")`

To produce panel (c) of Figure S-5, use default options except
set `this_state <- "Alabama"`

To produce panel (d) of Figure S-6, use default options except
set `this_date <- as.Date("2020-04-25")`
set `this_state <- "Alabama"`


